<!--
 * @Description:
 * @Author: ZachGmy
 * @Date: 2022-06-28 15:34:58
 * @LastEditors: ZachGmy
 * @LastEditTime: 2022-11-27 20:06:54
-->
<template>
  <div class="dateShow">
    <div class="inputButton">
      <el-button type="primary" size="small" @click="input()">上报</el-button>
    </div>

    <div class="dateTable">
      <el-table :data="hosData" style="font-size: 10px">
        <el-table-column type="index" label="序号" align="center">
        </el-table-column>

        <el-table-column prop="country" label="国" align="center">
        </el-table-column>

        <el-table-column prop="province" label="省" align="center">
        </el-table-column>

        <el-table-column prop="city" label="市" align="center">
        </el-table-column>

        <el-table-column prop="area" label="区" align="center">
        </el-table-column>

        <el-table-column prop="confirmed" label="新增确诊" align="center">
        </el-table-column>

        <el-table-column prop="suspected" label="疑似" align="center">
        </el-table-column>

        <el-table-column prop="dead" label="死亡" align="center">
        </el-table-column>

        <el-table-column prop="cure" label="治愈" align="center">
        </el-table-column>

        <el-table-column prop="severe" label="重症" align="center">
        </el-table-column>

        <el-table-column prop="outside" label="境外输入" align="center">
        </el-table-column>

        <el-table-column prop="inputTime" label="上报时间" align="center">
          <template slot-scope="scope">
            {{ scope.row.inputTime | fmtDate }}
          </template>
        </el-table-column>
      </el-table>
    </div>
  </div>
</template>

<script>
import { get } from "@/utils/request.js";
export default {
  data() {
    return {
      hosData: [],
    };
  },
  created() {
    this.getInlandData();
  },
  methods: {
    async getInlandData() {
      let params = {
        page: 1,
        pageSize: 10,
      };
      let res = await get("/epidemic/pageQuery", params);
      console.log(res);
      this.hosData = res.data.list;
    },
    input() {
      this.$router.push({
         path:'/data/input',
      });
    },
  },
};
</script>

<style scoped>
</style>
